﻿using System.Configuration;
using IGolovkine.ShoutCastRipper;
using IGolovkine.Core.Diagnostics;

namespace IGolovkine.ShoutCastRipper.Service.Configuration
{
    public class ContentTitleRegexFilterElement : ConfigurationElement
    {
        private const string RegexTag = "regex";
        private const string TypeTag = "type";

        [ConfigurationProperty(RegexTag, IsRequired = true)]
        public string Regex
        {
            get { return (string) this[RegexTag]; }
        }

        [ConfigurationProperty(TypeTag, IsRequired = true)]
        public string Type
        {
            get { return (string)this[TypeTag]; }
        }

        public override string ToString()
        {
            return ObjectDumper.Format(this);
        }
    }
}
